package com.alander.nexusgo.api;

import com.alander.nexusgo.api.fallback.UserServiceFallback;
import com.alander.nexusgo.common.model.vo.UserInfoVO;
import com.alander.nexusgo.common.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "nexusgo-user", fallback = UserServiceFallback.class)
public interface RemoteUserService {
    /**
     * 获取用户信息
     *
     * @param userId 用户id
     * @return 用户信息
     */
    @GetMapping("/getUserInfo/{userId}")
    public Result<UserInfoVO> getUserInfo(@PathVariable(value = "userId") String userId);

    /**
     * 更新用户信息
     *
     * @param userInfoVO 用户信息
     * @return 更新结果
     */
    @PutMapping("/updateUserInfo")
    public Result<Boolean> updateUserInfo(UserInfoVO userInfoVO);

    /**
     * 状态修改
     */
    @PutMapping("/updateStatus")
    public Result<Boolean> updateStatus(Long userId, Integer status);
}